New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-write Galaxy modeling code #157
Conversation
from astropy.table import Table | ||
from astropy.utils.data import get_pkg_data_filename | ||
|
||
filename = get_pkg_data_filename('data/atnf_sample.txt') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails because the data/atnf_sample.txt
file is not installed:
https://travis-ci.org/gammapy/gammapy/jobs/30936682#L974
You probably need to add this file via get_package_data
in setup_package.py
as described here ... you can find a few examples in other parts of Gammapy or Astropy.
t = self.age | ||
else: | ||
raise ValueError('Need time variable or age attribute.') | ||
r = np.where(t > self.sedov_taylor_begin, self._radius_sedov_taylor(t).to('cm'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add line break after comma? (I find this a bit more readable.)
Thanks for cleaning all this up! I did a review just based on reading the code. Feel free to merge after making travis-ci pass and addressing the comment, or ping me again if you want me to have a second look or actually try this stuff out. |
One thing that I don't like is that the radial distribution classes like The names get super-long if you write |
@adonath - I think Ellis wants to produce the main results for the SciNeGhe proceeding this week ... maybe it's possible to merge this on Thursday or Friday latest? (you can always make new PRs or smaller changes directly in master) |
Conflicts: gammapy/astro/population/spatial.py
Thanks! |
Fix unit of SCALE in PSF_3GAUSS, fixes gammapy#154
Revision of the galaxy source modelling code, including the following changes:
astropy.modeling.Fittable1DModel
astropy.units.Quantity
throughout the code